Workflow Soluiton

 View Only
  • 1.  Multiple Drop Down Lists in Ajax Panel

    Posted Nov 19, 2009 08:57 PM
    I have a collection of data that I am trying to filter within an Ajax Dynamic Update Panel Component

    The first Drop down list has all of the 'Materials' in it
           The second list has all of the "Manufacturers' that make that material. So far so good!
                    The third drop down list has all the 'Colors' of that Material made by the selected Manufacturer. Based on the selection in the 'Manufacturers' drop list 

    The  Materials and Manufacturers drop lists have the 'Post Form on Value Change' set to True but for some reason the Color drop list is only reading off of the 'Materials' selection.
    I have used a Dynamic Model to filter through the collection of items to appear on each drop list and the workflow is sound. 
    Is there a limit to the number of Drop Lists that can Post the form (or Panel)? Am I losing ThisForm data when I am Posting?

    I have even placed Ascii labels under each Drop list to confirm the selection after Post and sure enough the Manufacturer (second) drop list isn't populating the ASCII label.

    Any ideas would be greatly appreciated!
    Thanks!
    Phil


  • 2.  RE: Multiple Drop Down Lists in Ajax Panel

    Posted Nov 20, 2009 09:47 AM
    Are you declaring your output variables earlier in your model, or are you using the "This Form.Data" of your varibale in your workflow to determine the colors?  I have found that with Ajax the This Form data is not reliable.  It works when you use the add new data element or Initialize Data component ahead of your form.


  • 3.  RE: Multiple Drop Down Lists in Ajax Panel

    Posted Nov 20, 2009 10:04 AM
     This Form is the second component in Dialog WorkFlow Component (first being the SQL lookup of items).
    I am using the "This Form.Data" to determine the colours. 
    I'm not sure how to establish variable data before the form if the variable isnt being set until you are actually in the form.


  • 4.  RE: Multiple Drop Down Lists in Ajax Panel

    Posted Nov 20, 2009 10:22 AM
    Just use the Initialize Data component and don't set a value for the variable.  Just make sure you set the output data on your drop down box to be the same variable name.


  • 5.  RE: Multiple Drop Down Lists in Ajax Panel

    Posted Nov 20, 2009 12:33 PM
     That seems to be more reliable now! Thank you!
    One last question if I may. 
    I am building a collection to populate my drop down list, but if I go back and change my selection in the first field it isn't resetting the collection. It appears to be adding to the collection. I tried clearing the collection but it says it doesn't exist yet. Any ideas? This is my first time using Dynamic models.
    Thanks! 

    DropDownListDynamic.jpg


  • 6.  RE: Multiple Drop Down Lists in Ajax Panel

    Posted Nov 20, 2009 01:47 PM
    I would build your array with an initialize variable and then use that for your Items in your drop down.  Then you can remove items from the collection and add to it, etc.


  • 7.  RE: Multiple Drop Down Lists in Ajax Panel

    Posted Nov 20, 2009 05:22 PM
    I recommend you use the Configurable Collection filter instead for filtering those collections... a lot simpler. Also, you're right, if you put a clear collection component in that model, (say, between the start and ":for each" component) it will try to clear a collection that doesn't exist yet. Try this: with your other data, initialize a Logical true/false var. called "CollectionExists." Then in the model shown in your screenshot, add an "Add new data element" just before the End component of this model and set it to logical true/false, configure it to set the "CollectionExists" variable and set it to true. Then, right after the Start comp, add a True false rule comp and set it to evaluate the variable "CollectionExists," with the true path hitting a Clear collection comp and the false path skipping it.
    Make sense?